(function (global, factory) {
  Vue.use(VueI18n);

  var messages = factory(global),
    lang = "EN";

    /** url get
    if(window.$common){
        lang = $common.getUrlParams('lang');
    }
    //后台写入的cookies
    if(!lang){
        lang = $cookies.get('lang');
    }

	if(!lang) {//默认为英文国际化
		lang = 'EN';
	}**/

  Locale.i18n = new VueI18n({
    locale: lang, // lang是在网页上的
    messages: messages
  });
  Vue.use(ELEMENT, {
    i18n: function (key, value) {
      return Locale.i18n.t(key, value);
    }
  });
})(this, function (module, exports) {
  "use strict";
  if (this) {
    var cn = this.Locale.cn;
	    var en = this.Locale.en;
  } if (module) {
    var cn = module.Locale.cn;
    var en = module.Locale.en;
  } else {
    	var cn = Locale.cn;
    	var en = Locale.en;
  }
  return {
    "EN": en,
    "CN": cn
  };
});
